package com.example.huaxindemo2.mapper;


import com.example.huaxindemo2.entity.Pr102;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface Pr102Mapper {
    @Select("select m002.m00201,m002.m00202, t001.t00101, (m002.m00208 - m002.m00207) " +
            "as count, sum(m002.m00208 - m002.m00207) over(partition by m002.m00201) as totalCount " +
            "from m002, t001, t002 where t002.t00202 = m002.m00201 and t001.t00101 = t002.t00201")
    List<Pr102> getAllOrders();
}
